Optimal. Leaf size=164 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e} \sqrt{f+g x}}\right ) \left (4 e g (2 a e g-b (d g+e f))+c \left (3 d^2 g^2+2 d e f g+3 e^2 f^2\right )\right )}{4 e^{5/2} g^{5/2}}-\frac{\sqrt{d+e x} \sqrt{f+g x} (-4 b e g+5 c d g+3 c e f)}{4 e^2 g^2}+\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.179186, antiderivative size = 164, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {951, 80, 63, 217, 206} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e} \sqrt{f+g x}}\right ) \left (4 e g (2 a e g-b (d g+e f))+c \left (3 d^2 g^2+2 d e f g+3 e^2 f^2\right )\right )}{4 e^{5/2} g^{5/2}}-\frac{\sqrt{d+e x} \sqrt{f+g x} (-4 b e g+5 c d g+3 c e f)}{4 e^2 g^2}+\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 951
Rule 80
Rule 63
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \frac{a+b x+c x^2}{\sqrt{d+e x} \sqrt{f+g x}} \, dx &=\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g}+\frac{\int \frac{\frac{1}{2} \left (4 a e^2 g-c d (3 e f+d g)\right )-\frac{1}{2} e (3 c e f+5 c d g-4 b e g) x}{\sqrt{d+e x} \sqrt{f+g x}} \, dx}{2 e^2 g}\\ &=-\frac{(3 c e f+5 c d g-4 b e g) \sqrt{d+e x} \sqrt{f+g x}}{4 e^2 g^2}+\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g}+\frac{\left (c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )+4 e g (2 a e g-b (e f+d g))\right ) \int \frac{1}{\sqrt{d+e x} \sqrt{f+g x}} \, dx}{8 e^2 g^2}\\ &=-\frac{(3 c e f+5 c d g-4 b e g) \sqrt{d+e x} \sqrt{f+g x}}{4 e^2 g^2}+\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g}+\frac{\left (c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )+4 e g (2 a e g-b (e f+d g))\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{f-\frac{d g}{e}+\frac{g x^2}{e}}} \, dx,x,\sqrt{d+e x}\right )}{4 e^3 g^2}\\ &=-\frac{(3 c e f+5 c d g-4 b e g) \sqrt{d+e x} \sqrt{f+g x}}{4 e^2 g^2}+\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g}+\frac{\left (c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )+4 e g (2 a e g-b (e f+d g))\right ) \operatorname{Subst}\left (\int \frac{1}{1-\frac{g x^2}{e}} \, dx,x,\frac{\sqrt{d+e x}}{\sqrt{f+g x}}\right )}{4 e^3 g^2}\\ &=-\frac{(3 c e f+5 c d g-4 b e g) \sqrt{d+e x} \sqrt{f+g x}}{4 e^2 g^2}+\frac{c (d+e x)^{3/2} \sqrt{f+g x}}{2 e^2 g}+\frac{\left (c \left (3 e^2 f^2+2 d e f g+3 d^2 g^2\right )+4 e g (2 a e g-b (e f+d g))\right ) \tanh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e} \sqrt{f+g x}}\right )}{4 e^{5/2} g^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.822182, size = 173, normalized size = 1.05 \[ \frac{\sqrt{e f-d g} \sqrt{\frac{e (f+g x)}{e f-d g}} \sinh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e f-d g}}\right ) \left (4 e g (2 a e g-b (d g+e f))+c \left (3 d^2 g^2+2 d e f g+3 e^2 f^2\right )\right )+e \sqrt{g} \sqrt{d+e x} (f+g x) (4 b e g+c (-3 d g-3 e f+2 e g x))}{4 e^3 g^{5/2} \sqrt{f+g x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.307, size = 425, normalized size = 2.6 \begin{align*}{\frac{1}{8\,{e}^{2}{g}^{2}} \left ( 8\,\ln \left ( 1/2\,{\frac{2\,egx+2\,\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }\sqrt{eg}+dg+ef}{\sqrt{eg}}} \right ) a{e}^{2}{g}^{2}-4\,\ln \left ( 1/2\,{\frac{2\,egx+2\,\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }\sqrt{eg}+dg+ef}{\sqrt{eg}}} \right ) bde{g}^{2}-4\,\ln \left ( 1/2\,{\frac{2\,egx+2\,\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }\sqrt{eg}+dg+ef}{\sqrt{eg}}} \right ) b{e}^{2}fg+3\,\ln \left ( 1/2\,{\frac{2\,egx+2\,\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }\sqrt{eg}+dg+ef}{\sqrt{eg}}} \right ) c{d}^{2}{g}^{2}+2\,\ln \left ( 1/2\,{\frac{2\,egx+2\,\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }\sqrt{eg}+dg+ef}{\sqrt{eg}}} \right ) cdefg+3\,\ln \left ( 1/2\,{\frac{2\,egx+2\,\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }\sqrt{eg}+dg+ef}{\sqrt{eg}}} \right ) c{e}^{2}{f}^{2}+4\,\sqrt{eg}\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }xceg+8\,\sqrt{eg}\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }beg-6\,\sqrt{eg}\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }cdg-6\,\sqrt{eg}\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }cef \right ) \sqrt{ex+d}\sqrt{gx+f}{\frac{1}{\sqrt{ \left ( gx+f \right ) \left ( ex+d \right ) }}}{\frac{1}{\sqrt{eg}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.99462, size = 879, normalized size = 5.36 \begin{align*} \left [\frac{{\left (3 \, c e^{2} f^{2} + 2 \,{\left (c d e - 2 \, b e^{2}\right )} f g +{\left (3 \, c d^{2} - 4 \, b d e + 8 \, a e^{2}\right )} g^{2}\right )} \sqrt{e g} \log \left (8 \, e^{2} g^{2} x^{2} + e^{2} f^{2} + 6 \, d e f g + d^{2} g^{2} + 4 \,{\left (2 \, e g x + e f + d g\right )} \sqrt{e g} \sqrt{e x + d} \sqrt{g x + f} + 8 \,{\left (e^{2} f g + d e g^{2}\right )} x\right ) + 4 \,{\left (2 \, c e^{2} g^{2} x - 3 \, c e^{2} f g -{\left (3 \, c d e - 4 \, b e^{2}\right )} g^{2}\right )} \sqrt{e x + d} \sqrt{g x + f}}{16 \, e^{3} g^{3}}, -\frac{{\left (3 \, c e^{2} f^{2} + 2 \,{\left (c d e - 2 \, b e^{2}\right )} f g +{\left (3 \, c d^{2} - 4 \, b d e + 8 \, a e^{2}\right )} g^{2}\right )} \sqrt{-e g} \arctan \left (\frac{{\left (2 \, e g x + e f + d g\right )} \sqrt{-e g} \sqrt{e x + d} \sqrt{g x + f}}{2 \,{\left (e^{2} g^{2} x^{2} + d e f g +{\left (e^{2} f g + d e g^{2}\right )} x\right )}}\right ) - 2 \,{\left (2 \, c e^{2} g^{2} x - 3 \, c e^{2} f g -{\left (3 \, c d e - 4 \, b e^{2}\right )} g^{2}\right )} \sqrt{e x + d} \sqrt{g x + f}}{8 \, e^{3} g^{3}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b x + c x^{2}}{\sqrt{d + e x} \sqrt{f + g x}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21021, size = 242, normalized size = 1.48 \begin{align*} \frac{1}{4} \, \sqrt{{\left (x e + d\right )} g e - d g e + f e^{2}} \sqrt{x e + d}{\left (\frac{2 \,{\left (x e + d\right )} c e^{\left (-3\right )}}{g} - \frac{{\left (5 \, c d g^{2} e^{5} + 3 \, c f g e^{6} - 4 \, b g^{2} e^{6}\right )} e^{\left (-8\right )}}{g^{3}}\right )} - \frac{{\left (3 \, c d^{2} g^{2} + 2 \, c d f g e - 4 \, b d g^{2} e + 3 \, c f^{2} e^{2} - 4 \, b f g e^{2} + 8 \, a g^{2} e^{2}\right )} e^{\left (-\frac{5}{2}\right )} \log \left ({\left | -\sqrt{x e + d} \sqrt{g} e^{\frac{1}{2}} + \sqrt{{\left (x e + d\right )} g e - d g e + f e^{2}} \right |}\right )}{4 \, g^{\frac{5}{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]